package com.ruoyi.technicianOpus.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.technicianOpus.mapper.StoreTechnicianOpusMapper;
import com.ruoyi.technicianOpus.domain.StoreTechnicianOpus;
import com.ruoyi.technicianOpus.service.IStoreTechnicianOpusService;

/**
 * 技师作品Service业务层处理
 *
 * @author ch
 * @date 2021-11-24
 */
@Service
public class StoreTechnicianOpusServiceImpl implements IStoreTechnicianOpusService
{
    @Autowired
    private StoreTechnicianOpusMapper storeTechnicianOpusMapper;

    /**
     * 查询技师作品
     *
     * @param id 技师作品主键
     * @return 技师作品
     */
    @Override
    public StoreTechnicianOpus selectStoreTechnicianOpusById(Long id)
    {
        return storeTechnicianOpusMapper.selectStoreTechnicianOpusById(id);
    }

    /**
     * 查询技师作品列表
     *
     * @param storeTechnicianOpus 技师作品
     * @return 技师作品
     */
    @Override
    public List<StoreTechnicianOpus> selectStoreTechnicianOpusList(StoreTechnicianOpus storeTechnicianOpus)
    {
        return storeTechnicianOpusMapper.selectStoreTechnicianOpusList(storeTechnicianOpus);
    }

    /**
     * 新增技师作品
     *
     * @param storeTechnicianOpus 技师作品
     * @return 结果
     */
    @Override
    public int insertStoreTechnicianOpus(StoreTechnicianOpus storeTechnicianOpus)
    {
        storeTechnicianOpus.setCreateTime(DateUtils.getNowDate());
        return storeTechnicianOpusMapper.insertStoreTechnicianOpus(storeTechnicianOpus);
    }

    /**
     * 修改技师作品
     *
     * @param storeTechnicianOpus 技师作品
     * @return 结果
     */
    @Override
    public int updateStoreTechnicianOpus(StoreTechnicianOpus storeTechnicianOpus)
    {
        storeTechnicianOpus.setUpdateTime(DateUtils.getNowDate());
        return storeTechnicianOpusMapper.updateStoreTechnicianOpus(storeTechnicianOpus);
    }

    /**
     * 批量删除技师作品
     *
     * @param ids 需要删除的技师作品主键
     * @return 结果
     */
    @Override
    public int deleteStoreTechnicianOpusByIds(Long[] ids)
    {
        return storeTechnicianOpusMapper.deleteStoreTechnicianOpusByIds(ids);
    }


    /**
     * 批量逻辑删除技师作品
     *
     * @param ids 需要删除的技师作品主键
     * @return 结果
     */
    @Override
    public int logicDeleteStoreTechnicianOpus(Long[] ids,String delType,Long delUser)
    {
        return storeTechnicianOpusMapper.logicDeleteStoreTechnicianOpus(ids,delType,delUser);
    }

    /**
     * 删除技师作品信息
     *
     * @param id 技师作品主键
     * @return 结果
     */
    @Override
    public int deleteStoreTechnicianOpusById(Long id)
    {
        return storeTechnicianOpusMapper.deleteStoreTechnicianOpusById(id);
    }
}
